//根据运行环境标记,自动配置连接地址
const accountInfo = wx.getAccountInfoSync();
//版本信息
const envVersion = accountInfo.miniProgram.envVersion;

//develop：开发版 trial：体验版 release：正式版
// 发版审核时envVersion值为develop，发版时注意更改
console.log("envVersion:" + envVersion)

const getBaseUrl = () => {
  return {
    develop: {
      baseUrl: 'https://test.asgddigital.com/dcpapis-uat/DCP-APIS-EHS-UAT',
      towerUrl: 'https://test.asgddigital.com/dcpapis-uat/DCP-APIS-TOWER-UAT',
      fileUrl: 'https://test.asgddigital.com/dcpapis-uat/DCP-APIS-FILE-UAT',
      adminUrl: 'https://test.asgddigital.com/dcpapis-uat/ADMINAPIS-UAT',
      loginUri: 'dcpapis-uat/DCP-APIS-TOWER-UAT/api/sio/staffInfoSio/getUser',
      getVideosUri: 'dcpapis-uat/DCP-APIS-TOWER-UAT/api/pts/video/list',
      getVideoUri: 'dcpapis-uat/DCP-APIS-TOWER-UAT/api/pts/video/',
      getDictDataUri: 'dcpapis-uat/DCP-APIS-TOWER-UAT/api/pts/video/getDictData',
      signUrl: "https://esigntest.rasap.cn/main-index-web/home",
      awbUrl: 'https://test.asgddigital.com/dcpapis-uat/AWB-API/awb-api/',
      baseDomain: 'https://test.asgddigital.com/'
    },
    trial: {
      awbUrl: 'https://xhvms.rasap.cn/ms-dev/AWB-API/awb-api/',
      baseUrl: 'https://test.asgddigital.com/dcpapis-uat/DCP-APIS-EHS-UAT',
      towerUrl: 'https://test.asgddigital.com/dcpapis-uat/DCP-APIS-TOWER-UAT',
      fileUrl: 'https://test.asgddigital.com/dcpapis-uat/DCP-APIS-FILE-UAT',
      adminUrl: 'https://test.asgddigital.com/dcpapis-uat/ADMINAPIS-UAT',
      loginUri: 'dcpapis-uat/DCP-APIS-TOWER-UAT/api/sio/staffInfoSio/getUser',
      getVideosUri: 'dcpapis-uat/DCP-APIS-TOWER-UAT/api/pts/video/list',
      getVideoUri: 'dcpapis-uat/DCP-APIS-TOWER-UAT/api/pts/video/',
      getDictDataUri: 'dcpapis-uat/DCP-APIS-TOWER-UAT/api/pts/video/getDictData',
      signUrl: "https://esigntest.rasap.cn/main-index-web/home",
      baseDomain: 'https://test.asgddigital.com/'
    },
    release: {
      awbUrl: 'https://xhvms.rasap.cn/ms/AWB-API/awb-api/',
      baseUrl: 'https://dp.asgddigital.com/dcpapis/DCP-APIS-EHS',
      towerUrl: 'https://dp.asgddigital.com/dcpapis/DCP-APIS-TOWER',
      fileUrl: 'https://dp.asgddigital.com/dcpapis/DCP-APIS-FILE',
      adminUrl: 'https://dp.asgddigital.com/dcpapis/ADMINAPIS-DP',
      loginUri: 'dcpapis/DCP-APIS-TOWER/api/sio/staffInfoSio/getUser',
      getVideosUri: 'dcpapis/DCP-APIS-TOWER/api/pts/video/list',
      getVideoUri: 'dcpapis/DCP-APIS-TOWER/api/pts/video/',
      getDictDataUri: 'dcpapis/DCP-APIS-TOWER/api/pts/video/getDictData',
      signUrl: "https://esigntest.rasap.cn/main-index-web/home",
      baseDomain: 'https://dp.asgddigital.com/'
      //https//esign.rasap.cn/main-index-web/home  生产环境

    }
  } [envVersion]
}

export default getBaseUrl()